package com.mapper;

import com.pojo.Orders;
import com.pojo.Ordersitem;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author 35175
* @description 针对表【tb_ordersitem】的数据库操作Mapper
* @createDate 2024-11-18 09:30:29
* @Entity com.pojo.Ordersitem
*/
public interface OrdersitemMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Ordersitem record);

    int insertSelective(Ordersitem record);

    Ordersitem selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Ordersitem record);

    int updateByPrimaryKey(Ordersitem record);

    @Select("select * from tb_orders where user_id=#{id}")
    @Results({@Result(id = true,column = "id",property = "id"),@Result(column = "number",property = "number")})
    List<Orders> selectOrdersByUserId(int user_id);

}
